from django.shortcuts import render
from rest_framework.viewsets import ModelViewSet
from books.models import BookInfo
from .serializers import BookInfoSerializer
from rest_framework import generics
# Create your views here.

class BookInfoAPIView(ModelViewSet,generics.ListAPIView):
    #当前视图类所使用的所有方法的数据结果集是谁
    queryset = BookInfo.objects.all()
    #当前视图类使用的序列化类是谁
    serializer_class =BookInfoSerializer